package com.practice;

public class Competition {
    public static void main(String[] args) {
        //6个评委打分 范围0~10
        int[] score={8,9,7,7,8,6};
        int max=score[0];
        int min=score[0];
        int sum=0;
        for (int i = 1; i < score.length; i++) {
            if (max<score[i]) {
                sum+=max;
                max=score[i];
            }else sum+=score[i];
            if (min>score[i])min=score[i];
        }
        System.out.println(max);
        System.out.println(min);
        double avg=(sum-min)/4.0;
        System.out.println(avg);

    }
}
